{include file="public/head"/}
<div class="container-fluid" id="main">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-info">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
				<p></p>
            </div>
        </div>
    </div>
   
    
    <div class="ntDesktop">
    	<div class="ntDesktop-head">产品图册列表</div>
 
        <div class="row" style="padding-top:0px">
            <div class="col-md-6">
                <ul class="nav nav-tabs">
                    <li class="active">
                    	<a data-toggle="tab" @click="changeTab('list')">列表</a>
                    </li>
                    <li>
                    	<a data-toggle="tab" @click="changeTab('del')"> 删除</a>
                    </li>
                </ul>
            </div>
            <div class="col-md-6 text-right">
				<a href="{:url('album/albumopenadd',['request'=>'add'])}" class="btn btn-primary" v-if="auth_ids.indexOf(299) != -1" @click="setStorage()">
					<span class="glyphicon glyphicon-plus"></span> 添加新图册</a>
				<button class="btn btn-default" @click="operation(cheval,'del')" v-show="type=='list' && auth_ids.indexOf(303) != -1">批量删除</button>
				<button class="btn btn-default" @click="operation(cheval,'batchrestore')" v-show="type=='del' && auth_ids.indexOf(364) != -1">批量恢复</button>
				<button class="btn btn-default" @click="operation(cheval,'batchclear')" v-show="type=='del' && auth_ids.indexOf(366) != -1">批量清除</button>
            </div>
        
        </div>
        
        <div class="tab-content">
		
			<!-- 图册列表 -->
			<div class="row tab-pane active" id="album_list">
				<div class="col-md-12">
					<table class="table table-striped table-hover ntTable">
						<thead>
							<tr>
								<th style="text-align: center;"><input type="checkbox" @change="cheall" v-model="isallche" /> </th>
								<th>名称</th>
								<th>产品</th>
								<th class="sorting" @click="sortFun">共享</th>
								<th>开放日期</th>
								<th class="sorting" @click="sortFun">编辑</th>
								<th> 操作 {{list.length}}</th>
							</tr>
						</thead>
						<tbody>
							<template  v-if="list.length > 0">
							<tr v-for="(listitem,index) in list" :key="listitem.id">
								<td  style="text-align: center;"><input type="checkbox" @change="chaone(listitem.id,listitem.ische)" v-model="list[index].ische" /></td>
								<td>
									<div class="f-1"><strong>{{listitem.title}}</strong></div>
									<div class="text-info">{{listitem.subtitle}}</div>
									<span class="s-1 text-warning">
										{{listitem.intro}}
									</span>
								</td>
								<td align="right">{{formatUnit(listitem.pro,'UN')}} <small class="unit">UN</small></td>
								<td align="center">{{listitem.share}}</td>
								<td align="center">{{listitem.open_day}}<br/>{{listitem.finish_day}}</td>
								<td>{{listitem.nickname}} <br> {{listitem.time}}</td>
								<td align="right" v-show="type=='list'">
									<a :href="'/Admin/album/albumopenEdit?request=requestEdit&id='+listitem.id" class="btn btn-sm btn-primary" v-if="auth_ids.indexOf(300) != -1" @click="setStorage()">编辑</a>
									<a href="../album/preview.html" class="btn btn-sm btn-primary" >打印</a>
									<button class="btn btn-sm btn-primary" @click="albumCopy(listitem.id)" v-if="auth_ids.indexOf(301) != -1">复制</button>
									<a :href="'/admin/album/fixedPrice?album_id='+listitem.id" class="btn btn-sm btn-primary" target="_blank" v-if="auth_ids.indexOf(302) != -1">定价</a>
									<a href="../stat/pro_sale.html" class="btn btn-sm btn-primary">统计</a>
									<button class="btn btn-sm btn-default" @click="operation([listitem.id],'del')" v-if="auth_ids.indexOf(303) != -1">删除</button>
								</td>
								<td align="right" v-show="type=='del'">
									<button class="btn btn-sm btn-default" @click="operation([listitem.id],'restore')" v-if="auth_ids.indexOf(363) != -1"> 恢复</button>
									<button :href="''+listitem.id" class="btn btn-sm btn-default" @click="operation([listitem.id],'remove')" v-if="auth_ids.indexOf(365) != -1">清除</button>
								</td>
							</tr>
							</template>
							<template v-else>
							<tr style="text-align: center;"  >
	                            <td colspan="7" class="no_date" style="line-height: 10rem">{:lang('no_data')} </td>
	                        </tr>
	                        </template>
						</tbody>
					</table>
					<!-- 分页 -->
					<ul class="pagination" id="pagination" v-show="list.length!=0"></ul>
				</div>
			</div>

		</div>
		
		
	</div>
</div>

<script src="/static/Admin/js/album.js"></script>
{include file="public/foot"/}